﻿#region
using System;
using Nonsul.Biz;
using Nonsul.CoreModule;
using Nonsul.Data;

#endregion

namespace %Namespace%
{
    public partial class %Entity%Form : EntityForm
    {
        [Obsolete("디자인 타임 지원을 위해 기본생성자를 가지고 있어야 함 (호출 금지)")]
        protected %Entity%Form()
        {
            InitializeComponent();
        }

        public %Entity%Form(UntypedEntity untypedEntity)
            : base(untypedEntity)
        {
            InitializeComponent();
        }

        public %Entity%Form(int enityId)
            : this(BizRepository.%Entity%.GetByPK(enityId))
        {
            IsReadOnly = true;
        }

        public %Entity% TypedEntity
        {
            get { return (%Entity%) UntypedEntity; }
        }

        #region overriden properties
        #endregion

        #region overriden methods
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            if (DesignMode || RunTimeChecker.IsRunTime == false)
                return;
        }
        #endregion
    }
}